import { createApp } from 'vue'
import App from './App.vue'
import router from './router/index'
import store from './store'
//自定义的全局样式
import './assets/style/common.scss'
import './assets/style/reset.css'
import 'nprogress/nprogress.css'
//手机端适配
import 'lib-flexible'
// 手机端click300ms问题
import FastClick from 'fastclick'
FastClick.attach(document.body)
// vant 全局组件
import { Button,NavBar,Toast,Icon } from 'vant'

import VueLazyload from 'vue3-lazy'

const app = createApp(App);

// 图片懒加载
app.use(VueLazyload,{
    preLoad:1,//默认1.3. 表示lazyload的元素距离页面底部距离的百分比
    error:require('./assets/imgs/error-fill.png'),//加载失败显示图片
    loading:require('./assets/imgs/loading.png')
})
app.use(Button)
    .use(Toast)
    .use(NavBar)
    .use(Icon)
    .use(store)
    .use(router)
    .mount('#app')
